package com.pkk.cloud.support.oauth2.center.runner.integration.authenticator;


import com.pkk.cloud.support.admin.oauth2.api.common.resp.PenguinSysUserInfo;
import com.pkk.cloud.support.oauth2.config.integration.IntegrationAuthentication;
import com.pkk.cloud.support.oauth2.config.integration.authenticator.IntegrationAuthenticator;

/**
 * @author peikunkun
 **/
public abstract class AbstractPreparableIntegrationAuthenticator implements IntegrationAuthenticator<PenguinSysUserInfo> {

  /**
   * @Description: 处理集成认证操作, 认证以后获取用户信息
   * @Param: integrationAuthentication
   * @return: com.pkk.cloud.support.admin.oauth.api.common.resp.PenguinSysUser
   * @Author: peikunkun
   * @Date: 2020/3/18 0018 下午 1:14
   */
  @Override
  public abstract PenguinSysUserInfo authenticate(IntegrationAuthentication integrationAuthentication);

  /**
   * @Description: 前置操作
   * @Param: integrationAuthentication
   * @return: void
   * @Author: peikunkun
   * @Date: 2020/3/18 0018 下午 1:14
   */
  @Override
  public abstract void prepare(IntegrationAuthentication integrationAuthentication);

  /**
   * @Description: 判断是否支持集成认证类型
   * @Param: integrationAuthentication
   * @return: boolean
   * @Author: peikunkun
   * @Date: 2020/3/18 0018 下午 1:13
   */
  @Override
  public abstract boolean support(IntegrationAuthentication integrationAuthentication);

  /**
   * @Description: 后置操作
   * @Param: integrationAuthentication
   * @return: void
   * @Author: peikunkun
   * @Date: 2020/3/18 0018 下午 1:13
   */
  @Override
  public void complete(IntegrationAuthentication integrationAuthentication) {

  }
}
